package com.java.collection;
import java.util.ArrayList;
import java.util.List;


public class TestSetValTest {
	public static void main(String args[]){
		/*List list = new ArrayList();
		for(int i = 0; i<16; i++){
			list.add(i);
		}
		
		System.out.println("---->"+list.size());
		for(int i=0;i<list.size();i++){
			System.out.println("before-->"+list.get(i));
			if(i>10){
				System.out.println(list.get(i));
				list.remove(i);
			}
			System.out.println("after-->"+list.get(i));
		}
		System.out.println("---->"+list.size());
		
		for(int i=0;i<list.size();i++){
			System.out.println(list.get(i));
		}*/
		
		List<Object> list = new ArrayList<Object>();
		for(int i=0; i<10; i++){
			list.add(i);
		}
		
		/*list.set(1, 5);
		for(int i=0,j=10; i<10; i++,j--){
			list.set(i, j);
		}*/
		list.set(0, 111);
		
		for(Object o:list){
			System.out.println(" ---- " + o);
		}
	}
}
